﻿using AutoMapper;
using S.Breeding.Api.Application.Command.BodyMeasureCommand;
using S.Breeding.Api.Application.Command.ConditionMeasureCommand;
using S.Breeding.Api.Application.Command.DeathManageCommand;
using S.Breeding.Api.Application.Command.LambWeaningCommand;
using S.Breeding.Api.Application.Command.OustManageCommand;
using S.Breeding.Api.Application.Command.SheepWeighCommand;
using S.Breeding.Domain;

namespace S.Breeding.Api.Extensions
{
    public class BreedingProfile:Profile
    {
        public BreedingProfile()
        {
            //羊只称重
            CreateMap<SheepWeighCreateCommand, SheepWeigh>().ReverseMap();
            
            CreateMap<SheepWeighUpdateCommand, SheepWeigh>().ReverseMap();
            //体尺测定
            CreateMap<BodyMeasureCreateCommand, BodyMeasure>().ReverseMap();

            CreateMap<BodyMeasureUpdateCommand, BodyMeasure>().ReverseMap();
            //品相测定
            CreateMap<ConditionMeasureCreateCommand, ConditionMeasure>().ReverseMap();

            CreateMap<ConditionMeasureUpdateCommand, ConditionMeasure>().ReverseMap();
            //死亡管理
            CreateMap<DeathManageCreateCommand, DeathManage>().ReverseMap();

            CreateMap<DeathManageUpdateCommand, DeathManage>().ReverseMap();

            //淘汰管理
            CreateMap<OustManageCreateCommand, OustManage>().ReverseMap();

            CreateMap<OustManageUpdateCommand, OustManage>().ReverseMap();

            //羔羊断奶
            CreateMap<LambWeaningCreateCommand, LambWeaning>().ReverseMap();

            CreateMap<LambWeaningUpdateCommand, LambWeaning>().ReverseMap();
        }
    }
}
